package com.jacky.grpc;

import com.jacky.grpc.serivces.ClientService;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class ClientApplication {

    public static void main(String[] args) {
        SpringApplication.run(ClientApplication.class, args);
    }

    @Bean
    ApplicationRunner clientRunner(ClientService clientService) {
        return args -> {
            clientService.sayHello();
            clientService.sayHelloWithServerStream();
            clientService.sayHelloWithClientStream();
            clientService.sayHelloBiDirectStream();
        };
    }
}


